#include "stdio.h"
#include "string.h"
#include "stdlib.h"
/*
#include <stdio.h>
int fgetc(FILE *stream);

DESCRIPTION
       fgetc() reads the next character from  stream  and  returns  it  as  an
       unsigned char cast to an int, or EOF on end of file or error.

*/
void main()
{
	int i;

	FILE *fp = NULL;

	char *fname = "tmp.txt";
	fp = fopen(fname, "r"); 
	if (NULL == fp)
	{
		printf("func fopen（） err: %s \n", fname);
		return ;
	}

    while(!feof(fp)){
        char ret = fgetc(fp);
        printf("%c",ret);
        
    }
	
	if (fp != NULL)
	{
		fclose(fp);
	}

}
